/**
 * FIXME v5版本此文件应被删除，只留features/目录中定义的几个环境
 * domainType 区分（云效、tb、集团)
 * tenant  一般只要根据tenant判断即可
 */
import { getENV } from 'utils/features';

const { domainType, tenant, env } = window.FORCE;

// 集团内
export const isAlibabaDomain = domainType === 'ALIBABA';
// 云效
export const isAliyunDomain = domainType === 'ALIYUN';
// tb
export const isTBDomain = domainType === 'TEAMBITION';

export const isAliyun = tenant === 'ALIYUN';
export const isAlibaba = tenant === 'ALIBABA';
export const isVPC = getENV() === 'vpc';

// 预发环境
export const isPre = env === 'PREPUB';

export default {
  isAlibabaDomain,
  isTBDomain,
  isAliyunDomain,
  isAliyun,
  isAlibaba,
  isVPC,
  isPre,
};
